#ifndef LAYER_H
#define LAYER_H

#include "Alloy.h"

struct Layer {
    QModelIndex alloyIndex;

    QString name;
    double x;
    double d;
    double a_base;

    double Eg() const ;
    double a_lc() const ;
    double delta_so() const ;
    double vbo() const ;
    double mass_ef() const ;
    double ac() const ;
    double av() const ;
    double b() const ;
    double c11() const ;
    double c12() const ;

    double cb();
    double hh();
    double lh();

    inline Alloy alloy() const {
        return alloyIndex.data(Qt::UserRole).value<Alloy>();
    }
};

Q_DECLARE_METATYPE(Layer)

#endif // LAYER_H
